﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Strategy {
    public abstract class Duck {
        public IFlyBehavior FlyBehavior { private get; set; }
        public IQuackBehavior QuackBehavior { private get; set; }

        public abstract void Display();

        public void PerformFly() {
            FlyBehavior.Fly();
        }

        public void PerformQuack() {
            QuackBehavior.Quack();
        }

        public void Swim() {
            Console.WriteLine("All ducks float, even decoys!");
        }
    }
}
